]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
unlockDialog: Call AuthPrompt.addCharacter() directly
authorJonas Dreßler <verdre@v0yd.nl>
Wed, 22 Apr 2020 19:14:13 +0000 (21:14 +0200)
committerFlorian Müllner <florian.muellner@gmail.com>
Sat, 25 Apr 2020 14:54:07 +0000 (14:54 +0000)
The additional function UnlockDialog.addCharacter() is only used at one
place, so we can simply remove it and call AuthPrompt.addCharacter()
directly. The AuthPrompt is shown right before that anyway.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1209

js/ui/unlockDialog.js

index 2170f12a7699402f5a4751187b86c9dbaa365dd3..29122ca515a9bfd7e14d8d828bda6095f3c5d410 100644 (file)
@@ -605,7 +605,7 @@ var UnlockDialog = GObject.registerClass({
         this._showPrompt();
 
         if (GLib.unichar_isgraph(unichar))
-            this.addCharacter(unichar);
+            this._authPrompt.addCharacter(unichar);
 
         return Clutter.EVENT_PROPAGATE;
     }
@@ -835,11 +835,6 @@ var UnlockDialog = GObject.registerClass({
             this._authPrompt.cancel();
     }
 
-    addCharacter(unichar) {
-        this._showPrompt();
-        this._authPrompt.addCharacter(unichar);
-    }
-
     finish(onComplete) {
         this._ensureAuthPrompt();
         this._authPrompt.finish(onComplete);